

function addSensorbitCod(Blockly) {




    //光敏传感器模块
  Blockly.Python.microbit_light = function(block) {
    var dropdown_microbitLight = this.getFieldValue('microbitLight');
    Blockly.Python.definitions_['import_microbit'] = 'from microbit import *';
    Blockly.Python.definitions_['import_music'] = 'from sensor import photosensitive';
    var code = "photosensitive.get_value("+ dropdown_microbitLight +")";
    return [code];
  }

    return Blockly;
}

module.exports = addSensorbitCod;

